﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OOP.Command.DesignPattern.Mode1
{
    // 遥控器类（直接调用家电方法）
    public class RemoteControl
    {
        private Light _light;
        private Fan _fan;

        public RemoteControl(Light light, Fan fan)
        {
            _light = light;
            _fan = fan;
        }

        public void PressLightButton()
        {
            _light.TurnOn();  // 直接耦合
        }

        public void PressFanButton()
        {
            _fan.Start();     // 直接耦合
        }
    }
}
